package com.wecon.springdemo.ejob;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @description:
 * @author: Weikang Wang
 * @date: 2020/12/17 17:04
 */
@Component
public class PrintName implements SimpleJob {
    @Override
    public void execute(ShardingContext shardingContext) {
        System.out.println("I`m a good man, now:" + LocalDateTime.now() + shardingContext.toString());
    }
}
